<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>

<script type="text/javascript" src="<c:url value="/layout/javascript/largePaginator.js"/>">/**/</script>
<script type="text/javascript" src="<c:url value="/layout/javascript/jquery.form.js"/>">/**/</script>
<script type="text/javascript" src="<c:url value="/layout/javascript/form.js"/>">/**/</script>
<script type="text/javascript" src="<c:url value="/layout/javascript/form.admin.js"/>">/**/</script>
<script type="text/javascript">
$(document).ready(function() {
	var options = { 
	        target:    '#validationbox', 
	        
	        error:     function () {
	                       showErrorDialog('#dialog', 
	                                   { msg: "<bean:message key="office.submit.form.msg" bundle="errors"/>",
	                                     boxTitle: "<bean:message key="office.submit.form.boxTitle" bundle="errors"/>",
	                                     msgStatus: "<bean:message key="office.submit.form.msgStatus" bundle="errors"/>" });
	                  }  
	};
	
	$('#formNewOffice').ajaxForm(options);
});
</script>

<div id="content">
		<fieldset id="fieldset">
			<legend class="fieldsetLabel"><bean:message key="office.new" bundle="office"/></legend>
				
			<div id="form_containerNO">
				<html:form  styleId="formNewOffice" styleClass="appnitro" action="${requestScope.action}">
				    <html:hidden property="officeID"/>
				    
					<ul>	     		
						<li id="li_1NOffice" >
							<label class="description" for="subject"><bean:message key="office.roomnumber" bundle="office"/></label>
							<div>
								<html:text property="number" styleId="subject" styleClass="element text small" maxlength="255" /> 
							</div> 
						</li>
						<li id="li_2NOffice" >
							<label class="description" for="subject"><bean:message key="office.building" bundle="office"/></label>
							<div>
								<html:text property="building" styleId="subject" styleClass="element text medium" maxlength="255" /> 
							</div> 
						</li>
						<li id="li_3NOffice" >
							<label class="description" for="subject"><bean:message key="office.floor" bundle="office"/></label>
							<div>
								<html:text property="floor" styleId="subject" styleClass="element text small" maxlength="2" /> 
							</div> 
						</li>					
						<li id="li_4NOffice" >
							<label class="description" for="detail"><bean:message key="office.name" bundle="office"/></label>
							<div>
								<html:text property="name" styleId="detail" styleClass="element text medium" /> 
							</div> 
						</li>		
						<li id="li_5NOffice" >
							<label class="description" for="mail"><bean:message key="office.phone" bundle="office"/></label>
							<div>
								<html:text property="phone" styleId="mail" styleClass="element text small" maxlength="255" /> 
							</div> 
						</li>			
						<li class="buttons">
			    			<html:hidden property="officeID" name="form_id" value="" />
							<html:submit styleId="saveForm" styleClass="button_text">
							   <bean:message key="button.save"/>
							</html:submit>
						</li>
					</ul>
    			</html:form>	
			</div>
		</fieldset>	
</div>